{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# MNIST example with 3-conv. layer network\n",
    "\n",
    "This example demonstrates the usage of `LRFinder` with a 3-conv. layer network on the MNIST dataset."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/home/davidtvs-nb/lr-finder-rev/py3/pytorch-lr-finder/env/lib/python3.6/site-packages/torch_lr_finder/lr_finder.py:5: TqdmExperimentalWarning: Using `tqdm.autonotebook.tqdm` in notebook mode. Use `tqdm.tqdm` instead to force console mode (e.g. in jupyter console)\n",
      "  from tqdm.autonotebook import tqdm\n"
     ]
    }
   ],
   "source": [
    "%matplotlib inline\n",
    "\n",
    "import torch.nn as nn\n",
    "import torch.nn.functional as F\n",
    "import torch.optim as optim\n",
    "import torchvision.transforms as transforms\n",
    "from torch.utils.data import DataLoader\n",
    "from torchvision.datasets import MNIST\n",
    "\n",
    "try:\n",
    "    from torch_lr_finder import LRFinder\n",
    "except ImportError:\n",
    "    # Run from source\n",
    "    import sys\n",
    "    sys.path.insert(0, '..')\n",
    "    from torch_lr_finder import LRFinder"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Loading MNIST"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "mnist_pwd = \"../data\"\n",
    "batch_size= 256"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [],
   "source": [
    "transform = transforms.Compose([transforms.ToTensor(), transforms.Normalize((0.1307,), (0.3081,))])\n",
    "\n",
    "trainset = MNIST(mnist_pwd, train=True, download=True, transform=transform)\n",
    "trainloader = DataLoader(trainset, batch_size=batch_size, shuffle=True, num_workers=0)\n",
    "\n",
    "testset = MNIST(mnist_pwd, train=False, download=True, transform=transform)\n",
    "testloader = DataLoader(testset, batch_size=batch_size * 2, shuffle=False, num_workers=0)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Model"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {
    "scrolled": true
   },
   "outputs": [],
   "source": [
    "class Net(nn.Module):\n",
    "    def __init__(self):\n",
    "        super(Net, self).__init__()\n",
    "        self.conv1 = nn.Conv2d(1, 10, kernel_size=5)\n",
    "        self.conv2 = nn.Conv2d(10, 20, kernel_size=5)\n",
    "        self.conv2_drop = nn.Dropout2d()\n",
    "        self.fc1 = nn.Linear(320, 50)\n",
    "        self.fc2 = nn.Linear(50, 10)\n",
    "\n",
    "    def forward(self, x):\n",
    "        x = F.relu(F.max_pool2d(self.conv1(x), 2))\n",
    "        x = F.relu(F.max_pool2d(self.conv2_drop(self.conv2(x)), 2))\n",
    "        x = x.view(-1, 320)\n",
    "        x = F.relu(self.fc1(x))\n",
    "        x = F.dropout(x, training=self.training)\n",
    "        x = self.fc2(x)\n",
    "        return F.log_softmax(x, dim=1)\n",
    "    \n",
    "model = Net()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Training loss (fastai)\n",
    "\n",
    "This learning rate test range follows the same procedure used by fastai. The model is trained for `num_iter` iterations while the learning rate is increased from its initial value specified by the optimizer algorithm to `end_lr`. The increase can be linear (`step_mode=\"linear\"`) or exponential (`step_mode=\"exp\"`); linear provides good results for small ranges while exponential is recommended for larger ranges."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "application/vnd.jupyter.widget-view+json": {
       "model_id": "fdfa492ece15454187a47f72d9d145bb",
       "version_major": 2,
       "version_minor": 0
      },
      "text/plain": [
       "HBox(children=(FloatProgress(value=0.0), HTML(value='')))"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\n",
      "Learning rate search finished. See the graph with {finder_name}.plot()\n"
     ]
    }
   ],
   "source": [
    "criterion = nn.NLLLoss()\n",
    "optimizer = optim.SGD(model.parameters(), lr=0.001, momentum=0.5)\n",
    "lr_finder = LRFinder(model, optimizer, criterion, device=\"cuda\")\n",
    "lr_finder.range_test(trainloader, end_lr=10, num_iter=100, step_mode=\"exp\")"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Note that the loss in the loss vs. learning rate plot is the **training** loss."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {
    "scrolled": false
   },
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYoAAAELCAYAAADHksFtAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjIsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy8li6FKAAAgAElEQVR4nO3deXxU9b3/8ddnsu+BLBCyECACsqMBUayKtXWpda1W61JbW69Xa/Wn9Xbv7Xp7e1u9be2tLWpr67W2WtTr1qpVEVckIIKAKDtIIAsQsk4yyff3xwyINBkmy2RyJu/n4zGPx+TMOTMfTkLe+Z7v+X6/5pxDRESkJ75YFyAiIkObgkJERMJSUIiISFgKChERCUtBISIiYSkoREQkrKgFhZmVmtkLZrbWzNaY2Y1h9p1jZgEz+1S06hERkb5JjOJ7B4BbnHMrzCwLWG5mzzrn1h66k5klAD8BnonkTfPz8115efmAFysiEs+WL19e55wr6MuxUQsK51w1UB163mhm64BiYO1hu94ALALmRPK+5eXlVFVVDWSpIiJxz8y29vXYQemjMLNyYDaw9LDtxcD5wJ2DUYeIiPRe1IPCzDIJthhucs7tP+zlnwNfdc51HeE9rjGzKjOrqq2tjVapIiLSDYvmXE9mlgQ8ATztnLu9m9c3Axb6Mh9oAa5xzj3a03tWVlY6XXoSEekdM1vunKvsy7FR66MwMwPuAdZ1FxIAzrlxh+x/L/BEuJAQEZHBF827nuYDVwCrzWxlaNs3gDIA59x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Etn089O9YYWYPmdmABaXIQc45PfSIiwfQ1M22PwEnhp6XAetCz7OBxNDz04BFoedXEZyKeWTo61OABoKTqfkITpFw4P0WE/zrHsABnww9/y/gW6HnTwCXhp5f20ON5UAXMO+QbQc+PyH0OTNCX28B8kPP84ElQEbo668C34n190GP+HtomnGJd6cBU0KNAIDs0F/dOcAfzOwogr/kkw455lnn3J5Dvn7DObcDwMxWEvzF/vJhn9NOMBQAlgMfCz0/Hjgv9PxPwM96qHOrc+71Q76+2MyuIbgUQBHB1clWHXbMvND2V0L/vmSCQSYyoBQUEu98BP9Sbzt0o5n9CnjBOXd+aFWwxYe83HzYe/gPed5J9/9vOpxz7gj7hHPwM81sHPAVYI5zbq+Z3QukdnOMEQy1S3v5WSK9oj4KiXfPEFwBEAAzmxV6msMH8/JfFcXPfx24MPT8kgiPySYYHA2hvo4zD3mtEcg65L3nm1kFgJllmNnE/pcs8mEKCokn6aHplQ88bga+DFSa2SozW8sHq3r9F/BjM3uT6LasbwJuNrNVQAXB/o6wnHNvAW8C7xC8XPXKIS8vBP5uZi8452oJhtwDofd/DZg8sOWL6PZYkagKjXlodc45M7uEYMf2ubGuS6Q31EchEl3HAr8K3VK7D/h8jOsR6TW1KEREJCz1UYiISFgKChERCUtBISIiYSkoREQkLAWFiIiEpaAQEZGw/j8IcVPSRqDtTgAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "lr_finder.plot()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "To restore the model and optimizer to their initial state use the `reset()` method."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [],
   "source": [
    "lr_finder.reset()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "We can also run the test with a different starting learning rate without creating a new optimizer using the `start_lr` parameter."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "application/vnd.jupyter.widget-view+json": {
       "model_id": "a4f20a68cf864179a59d56af3b97c648",
       "version_major": 2,
       "version_minor": 0
      },
      "text/plain": [
       "HBox(children=(FloatProgress(value=0.0), HTML(value='')))"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\n",
      "Learning rate search finished. See the graph with {finder_name}.plot()\n"
     ]
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYIAAAEKCAYAAAAfGVI8AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjIsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy8li6FKAAAgAElEQVR4nO3dd3yV9f3+8dc7m2xCwkzYGwSUyFShjrpxoUItrUpV3Nbaur5atbXW+tNWW0WpWkUrLnDgqK0WF0MIe+89wwoZZH9+f+RgARMIJCf3Gdfz8TgPzzn3fc65QE6u3OvzMeccIiISviK8DiAiIt5SEYiIhDkVgYhImFMRiIiEORWBiEiYUxGIiIS5KK8DHKv09HTXtm1br2OIiASV2bNn73TOZVS3LOiKoG3btuTk5HgdQ0QkqJjZ+pqWadeQiEiYUxGIiIQ5FYGISJhTEYiIhDkVgYhImFMRiIiEuaA7ffR4bd9XzPyNe0lPiiUjMZYmiTHEx4TNH19EpEZh85Pwu7W7uW3C3EOei4+JpEliDE0SYmmSEEPT5FiaJsXRNDmWZr7/Nk2KIz0xhqhIbTyJSGgKmyIY2iWDD28ZzM6CEnYWlLKzoIRdBaXsKihhV2EpW/KKmb8pj12FJRw+V48ZNE+OIystnta+W1ZaI7IaV93PSIrFzLz5g4mI1FHYFEFyXDS9MlOPul5ZRSW7CkrZvq+YHfkl3/938579bNxdxLcrd7JtX/Ehr4mPiaRTsyS6NEukS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r/w+6Bd9Nw1BLqDsT6O77JR4g2fdbcwrwqpl1ouqHePRBr/mPc273QY9nOuc2AZjZPKp+cH972OeUUvVDH2A2cJbv/kDgYt/9N4D/V0PO9c65GQc9vsLMrqdqqPgWVM1yteCw1wzwPT/V9+eLoaqoRI6JikBCXQRVv2kXH/ykmf0NmOKcu8Q3u9SXBy0uPOw9Sg66X0H135sy55w7yjpH8v1nmlk74C7gZOfcHjN7BYir5jVGVWmNPMbPEjmEjhFIqPs3cOuBB2bWx3c3hf+ND3+1Hz9/BnCZ7/6IWr4mmapiyPMdazj3oGX5QNJB7z3YzDoCmFmCmXWue2QJNyoCCSXxvmGAD9zuBG4Dss1sgZkt4X+zov0JeMzM5uLfLeM7gDvNbAHQkarjDUfknJsPzAWWUbU7aepBi8cB/zKzKc65XKpKbILv/acDXes3voQDnT4q4ke+c/73O+ecmY2g6sDxRV7nEjmYjhGI+Fdf4G++U073Atd6nEfkB7RFICIS5nSMQEQkzKkIRETCnIpARCTMqQhERMKcikBEJMypCEREwtz/B35IFRzTGeyIAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "lr_finder.range_test(trainloader, start_lr=0.02, end_lr=1.5, num_iter=100, step_mode=\"exp\")\n",
    "lr_finder.plot()\n",
    "lr_finder.reset()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Validation loss (Leslie N. Smith)\n",
    "\n",
    "If a dataloader is passed to `LRFinder.range_test()` through the `val_loader` parameter the model is evaluated on that dataset after each iteration. The evaluation loss is more sensitive to instability therefore it provides a more precise view of when the divergence occurs. The disadvantage is that it takes significantly longer to run.\n",
    "\n",
    "This version of the learning rate range test is described in [Cyclical Learning Rates for Training Neural Networks by Leslie N. Smith](https://arxiv.org/abs/1506.01186)."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "application/vnd.jupyter.widget-view+json": {
       "model_id": "c817dea29d4741c3868a064013682b0b",
       "version_major": 2,
       "version_minor": 0
      },
      "text/plain": [
       "HBox(children=(FloatProgress(value=0.0), HTML(value='')))"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\n",
      "Learning rate search finished. See the graph with {finder_name}.plot()\n"
     ]
    }
   ],
   "source": [
    "lr_finder.range_test(trainloader, val_loader=testloader, end_lr=10, num_iter=100, step_mode=\"exp\")"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Note that the loss in the loss vs. learning rate plot is the **evaluation** loss."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYIAAAEKCAYAAAAfGVI8AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjIsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy8li6FKAAAgAElEQVR4nO3deXxddZ3/8dcn+560WZo2SZvu+5620GKp7DCoIAqiIoWyFGEQ0VHHn8OMOo6Oo8yoKIiyC1VZlEVZpSyla7qnG93btEmbNG2SZl++vz9ywVqSNGlzcu7NfT8fj/vwLufe++4x5J1zvud8jznnEBGR8BXhdwAREfGXikBEJMypCEREwpyKQEQkzKkIRETCnIpARCTMRfkdoLsyMjJcfn6+3zFERELK6tWry51zme29FnJFkJ+fT2Fhod8xRERCipnt7eg17RoSEQlzKgIRkTCnIhARCXMqAhGRMKciEBEJcyoCEZEwF3KHj56u0sp6Nh6oJC46grjoSOKiIomPiSA+Jor46EjioyOJi47AzPyOKiLSq8KmCFbtqeCfF63tdBkzSIiOJCE2isSYSBJiokiKjSIxNpKkuGiSYiNJio0iKTaa5LgokuKiSImL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RiDirenAfYFDTo8BN/qcR+QjtEUgIhLmNEYgIhLmVAQiImFORSAiEuZUBCIiYU5FICIS5lQEIiJh7v8DmTxyO/nhTrQAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "lr_finder.plot(skip_end=1)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "To restore the model and optimizer to their initial state use the `reset()` method."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [],
   "source": [
    "lr_finder.reset()"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "pytorch-lr-finder3",
   "language": "python",
   "name": "pytorch-lr-finder3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.9"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
